As pointed out by C. J. Date in "An Introduction to Database Systems", Vol. 2, Addison-Wesley Publishing Company, 1983, the purpose of a database system is to carry out transactions. A transaction is a unit of work that consists of the execution of an application-specified sequence of operations initiated with a BEGIN transaction operation, including one or more UPDATE and/or READ database access operations, and ending with either a COMMIT or BACKOUT operation. A COMMIT operation signals successful termination of a transaction; while a BACKOUT operation denotes unsuccessful termination of a transaction due to abnormal circumstances.
The COMMIT and BACKOUT operations are employed to ensure the atomic property for transactions. Relatedly, a transaction either succeeds or fails. In succeeding, the results of the transaction are made permanent (committed); in failing, all effects of the unsuccessful transaction are removed (backed out).
Transaction oriented systems include a recovery manager, or equivalent, which is typically a procedure or set of procedures that operate to maintain the atomic nature of transactions and to re-establish system operation after failure. The recovery manager maintains atomicity by means of a transaction synchronization procedure. Such procedures are commonly called "commit" procedures.
In a transaction-oriented system which includes either a single site where transaction operations are executed or which permits such operations to be executed at only one site during any transaction, transaction atomicity is enforced by a single-phase synchronization operation. In this regard, when the transaction is completed, the recovery manager requests that the site make permanent all changes to the database occurring during the transaction. In response, the site, in a single phase, either commits or backs out the changes and reports the commit or backout to the recovery manager.
In distributed database systems encompassing a multiplicity of sites, each of which may include a database, a transaction may cause changes to be made at more than one site. In such a system, atomicity can be guaranteed only if all of the sites involved in the transaction agree on its outcome. As described by H. F. Korth, et al in "Database System Concepts", McGraw-Hill Book Company, Copyright 1986, distributed database systems can use a transaction synchronization procedure called two-phase commit protocol to guarantee atomicity. In this regard, assume that a transaction ends successfully at an execution site and a recovery manager requests that all database sites commit database access operations involved in the transaction. In the first phase of the protocol, all involved database sites are requested to prepare to commit. In response, the sites individually decide, based upon local conditions, whether to commit or back out their operations. The decisions are communicated to a synchronization location where the "votes" are counted. In the second phase, if all sites vote to commit, a request to commit is issued, in response to which all of the sites commit their operations. On the other hand, if any site votes to back out its operation, all sites are instructed to back out their operations.
There may be distributed database systems embracing a plurality of sites in which some sites may employ a two-phase commit protocol, while other sites are only capable of conducting a single-phase operation. In the Description which follows, such systems are called "distributed, heterogeneous database systems". A distinct peril in distributed, heterogeneous database systems is posed by a transaction which may update at more than one site. If a first update site supports only a single-phase commit protocol, while a second site supports a two-phase protocol, commitment at either site cannot be undone if it precedes backout at the other. One solution is to limit transactions to updating only a single site in all cases. However, this sacrifices the speed and flexibility inherent in a distributed system.
Accordingly, there is manifest need in distributed, heterogeneous database systems to ensure transaction atomicity by providing coordination between single-phase and multi-phase commit processing in order to preserve the ability to update at multiple sites without having to incur the expense to upgrade all sites to two-phase operation.